﻿using System;
using GameCore.Mapping;
using GameCore.Mapping.Format;

using System.IO;


using Microsoft.Xna.Framework.Content.Pipeline;

namespace GameCore.Importers
{
    [ContentImporter(".map", DisplayName = "Map Importer", DefaultProcessor = "Static Map Importer")]
    class MapImporter : ContentImporter<MapImport>
    {
        public override MapImport Import(string filename, ContentImporterContext context)
        {
            Map map = FormatManager.Instance.LoadMap(filename);
            string mapDirectory = Path.GetDirectoryName(filename);
            return new MapImport(map, mapDirectory);
        }
    }
}
